package com.hxm.appGenealogy.entity;

import lombok.Data;

@Data
public class ResponDataVo {

    Boolean flag;
    String message;
    Object data;

    //普通封装;
    public ResponDataVo(Boolean flag, String message, Object data) {
        this.flag = flag;
        this.message = message;
        this.data = data;
    }

    //成功返回数据;
    public ResponDataVo(Object data) {
        this.flag = true;
        this.message = "success";
        this.data = data;
    }

    //失败返回数据;
    public ResponDataVo(String message) {
        this.flag = false;
        this.data = null;
        this.message = message;
    }

    public ResponDataVo(Boolean flag){
        this.flag = true;
        this.data = null;
        this.message = "success";
    }


}
